package com.skt.common_hr.biztrip.model.vo
{
	import com.wcl.utils.NumberUtil;
	
	[Bindable]
	public class MemberAdjustVO
	{
		public var PERNR:String;			// 사원 번호
		public var ENAME:String;				// 사원 또는 지원자의 포맷된 이름
		public var TRTICH:String;				// 중식미제공
		
		public var TRICH_N:String;				// 중식제공
		
		public var DAYPY:Number = 0;				// 일비
		public var PCARC:String;				// 개인차량이용
		public var OCARC:String;				// 회사차량이용
		public var TCARC:String;				// 개인/업무용차량
		public var DRIKM:Number = 0;			// 운행거리
		public var PCAPY:Number = 0;				// 유류비
		public var EATPY:Number = 0;				// 식비
		public var STYPY:Number = 0;				// 숙박비
		public var TRAPY:Number = 0;				// 교통비
		public var AIRPY:Number = 0;				// 항공료
		public var WAERS:String = "KRW";			// 통화 키
		public var EGBN:String;					// 연수/세미나 여부
		
		//20110928
		public var DODPY:Number = 0;				// 시내출장비용
		
		
		public function get sum():String
		{
			return NumberUtil.NumberFormat(sumN);
		}
		public function set sum(s:String):void
		{
			
		}
		public function get sumN():Number
		{
			return DAYPY + PCAPY + EATPY + STYPY + TRAPY + AIRPY + DODPY; // DODPY 추가
		}
		
		public function get vehicle():String
		{
			return (PCARC=="X") ? "개인차량": "" || (OCARC=="X") ? "회사차량": "" || (TCARC=="X") ? "차량동승": "";
			
		}
		
		public function set vehicle(s:String):void
		{}
		public function get DAYPY_F():String
		{
			return NumberUtil.NumberFormat(DAYPY);
		}
		public function set DAYPY_F(s:String):void
		{}
		public function get PCAPY_F():String
		{
			return NumberUtil.NumberFormat(PCAPY);
		}
		public function set PCAPY_F(s:String):void
		{}
		public function get EATPY_F():String
		{
			return NumberUtil.NumberFormat(EATPY);
		}
		public function set EATPY_F(s:String):void
		{}
		
		public function get DODPY_F():String
		{
			return NumberUtil.NumberFormat(DODPY);
		}
		public function set DODPY_F(s:String):void
		{}
		
				
		public function get STYPY_F():String
		{
			return NumberUtil.NumberFormat(STYPY);
		}
		public function set STYPY_F(s:String):void
		{}
		public function get TRAPY_F():String
		{
			return NumberUtil.NumberFormat(TRAPY);
		}
		public function set TRAPY_F(s:String):void
		{}
		public function get AIRPY_F():String
		{
			return NumberUtil.NumberFormat(AIRPY);
		}
		public function set AIRPY_F(s:String):void
		{}
		public function clone():MemberAdjustVO
		{
			var target:MemberAdjustVO = new MemberAdjustVO();
			target.PERNR 	= this.PERNR;
			target.ENAME 	= this.ENAME;
			target.TRTICH 	= this.TRTICH;
			target.TRICH_N 	= this.TRICH_N;
			target.DAYPY 	= this.DAYPY;
			target.PCARC 	= this.PCARC;
			target.DRIKM	= this.DRIKM;
			target.OCARC 	= this.OCARC;
			target.PCAPY 	= this.PCAPY;
			target.EATPY 	= this.EATPY;
			target.STYPY 	= this.STYPY;
			target.TRAPY 	= this.TRAPY;
			target.AIRPY 	= this.AIRPY;
			target.WAERS 	= this.WAERS;
			target.EGBN		= this.EGBN;
			target.TRICH_N	= this.TRICH_N;

			target.DODPY 	= this.DODPY;
			
			return target;
		}

		public function get id():String
		{
			return ENAME+ "(" +PERNR+")" 
		}
		public function set id(s:String):void
		{
			
		}
		
		public function get trtich():Boolean 
		{
			return (TRTICH=="X") ? true:false;
		} 
		public function set trtich(v:Boolean):void
		{
			TRTICH = (v) ? "X":"";
		}
		
		public function get trich_n():Boolean 
		{
			return (TRICH_N=="X") ? true:false;
		} 
		public function set trich_n(v:Boolean):void
		{
			TRICH_N = (v) ? "X":"";
		}
		
				
		public function get seminar():Boolean
		{
			return (EGBN=="X") ? true : false;
		}
		public function set seminar(v:Boolean):void
		{
			this.EGBN = (v) ? "X" : "";
		}
	}
}